package com.xrui.hbaseview.ui;

import java.util.HashMap;
import java.util.Map;

public class UIUpdateHandler {

    private static Map<String, Boolean> states;

    static {
        states = new HashMap<>();
    }

    private UIUpdateHandler() {
    }

    public static boolean enter(String method) {
        if (states.containsKey(method)) {
            return false;
        }

        states.put(method, true);
        return true;
    }

    public static void leave(String method) {
        states.remove(method);
    }
}
